<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Insert title here</title>
	<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
	<script type="text/javascript">
		$(function(){
			$("form").submit(function(){
				if($(":text:eq(0)").val()==""){
					alert("问题为必填项!");
					return false;
				}
			});
		});
	</script>
</head>
<body>
	<form action="insert" method="post">
		<table>
			<tr>
				<td colspan="2">我要提问</td>
			</tr>
			<tr>
				<td colspan="2"><a href="/c_answers/">返回首页</a></td>
			</tr>
			<tr>
				<td>问题：</td>
				<td><input type="text" name="title"/></td>
			</tr>
			<tr>
				<td>问题描述:</td>
				<td><textarea name="detailDesc"></textarea></td>
			</tr>
			<tr>
				<td colspan="2" align="center"><input type="submit"
					value="保存提问" /></td>
			</tr>
		</table>
	</form>
</body>
</html>